package main

import (
	"fmt"
)

func main()  {
	var a1 A=Cat{"白色的猫"}

	var a2 A=Person{name:"张帮龙"}

	var a3 A="sdfsdfsf"   // 接收字符串
	fmt.Println(a1)
	fmt.Println(a2)
	fmt.Println(a3)


	// 定义 map key为字符串    value为字符串
	map1 :=make(map[string]interface{})
	map1["name"]="张帮龙"
	map1["age"]=30
	map1["freiend"]=Person{name:"lisi",age:15}   //map[age:30 freiend:{lisi 15} name:张帮龙]

	slice1 :=make([]interface{},0,18)
	slice1=append(slice1,a1,a2,100)
	fmt.Println(slice1)  //[{白色的猫} {张帮龙 0} 100]

	fmt.Println(map1)



}

//空接口
type A interface {

}
type Cat struct {
	color string
}
type Person struct {
	name string
	age int
}


